package com.cff.shorturl.http.body;

public enum ResType {  
	HTML("text/html"),
    JSON("application/json"),
    JS("application/javascript"),
    PNG("image/png"),
    TEXT("text/plain"),
    ICO("image/x-icon"),
    JPG("image/jpg");
    String value = null;
    ResType(String value) {
        this.value = value;
    }
    public String getValue() {
        return value;
    }
    
    public static ResType enumType(String value){
    	for (ResType m : ResType.values()) {
			if(m.getValue().equals(value))return m;
		}
    	return HTML;
    }
    
    public static ResType enumTypeIgnoreCase(String value){
    	for (ResType m : ResType.values()) {
			if(m.name().equalsIgnoreCase(value))return m;
		}
    	return HTML;
    }
}
